home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / gptx-0_2.lha / gptx-0.2 / Makefile.in < prev    next >
Makefile  |  1991-10-10  |  4KB  |  148 lines

  1. # Master Makefile for GNU permuted indexer.
  2. # Copyright (C) 1991 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. SHELL = /bin/sh
  19.  
  20. #### Start of system configuration section. ####
  21.  
  22. srcdir = @srcdir@
  23. @VPATH@
  24.  
  25. # If you use gcc, you should either run the fixincludes script that
  26. # comes with it or else use gcc with the -traditional option.  Otherwise
  27. # ioctl calls will be compiled incorrectly on some systems.
  28. CC = @CC@
  29. AR = ar
  30. # Set RANLIB = echo if your system doesn't have or need ranlib.
  31. RANLIB = @RANLIB@
  32. # Use makeinfo if you have it, else format through GNU Emacs.
  33. MAKEINFO = @MAKEINFO@
  34. # Use cp if you don't have install.
  35. INSTALL = @INSTALL@
  36. INSTALLDATA = @INSTALLDATA@
  37.  
  38. # Things you might add to DEFS:
  39. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  40. # -DUSG            If you have System V/ANSI C string and
  41. #            memory functions and headers.
  42. # -DCHAR_UNSIGNED    If type `char' is unsigned.
  43. # -DVPRINTF_MISSING    If you lack vprintf function (but have _doprnt).
  44. # -DDOPRNT_MISSING    If you lack _doprnt function.  Also need to define
  45. #            -DVPRINTF_MISSING.
  46. # -DSTRERROR_MISSING    If you lack strerror function.
  47. # -DMCHECK_MISSING    If you lack mcheck function, included in GNU malloc.
  48.  
  49. DEFS = -DSYNTAX_TABLE @DEFS@
  50.  
  51. CFLAGS = -g -I$(srcdir) -I$(srcdir)/lib $(DEFS)
  52. LDFLAGS = -g
  53. LIBS = @LIBS@
  54.  
  55. # Common prefix for installation directories.
  56. # NOTE: This directory must exist when you start installation.
  57. prefix = /usr/local
  58. # Directory in which to put the executables.
  59. bindir = $(prefix)/bin
  60. # Directory in which to put the Info documentation.
  61. infodir = $(prefix)/info
  62.  
  63. #### End of system configuration section. ####
  64.  
  65. MDEFINES = bindir='$(bindir)' infodir='$(infodir)' \
  66. LIBS='$(LIBS)' MAKEINFO='$(MAKEINFO)' AR='$(AR)' RANLIB='$(RANLIB)' \
  67. INSTALL='$(INSTALL)' INSTALLDATA='$(INSTALLDATA)' \
  68. CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' CC='$(CC)'
  69.  
  70. SOURCES = gptx.c version.c
  71.  
  72. DISTFILES = README COPYING ChangeLog configure Makefile.in \
  73. gptx.texi gptx.h $(SOURCES) boxes.el gptx.info checkout
  74.  
  75. PROGS = gptx @PROGS@
  76.  
  77. all: @INFOS@
  78.     @echo making $@ in lib; cd lib; $(MAKE) $(MDEFINES) $@
  79.     @echo making $(PROGS); $(MAKE) $(MDEFINES) $(PROGS)
  80. .PHONY: all
  81.  
  82. check: all
  83.     ./gptx -A -f < $(srcdir)/COPYING > checkout2
  84.     cmp $(srcdir)/checkout checkout2 && rm checkout2
  85. .PHONY: check
  86.  
  87. install: all
  88.     $(INSTALL) $(PROGS) $(bindir)
  89.     $(INSTALLDATA) gptx.info $(infodir)/gptx.info
  90. .PHONY: install
  91.  
  92. tags: $(SOURCES)
  93.     ctags $(SOURCES)
  94. .PHONY: tags
  95.  
  96. TAGS: $(SOURCES)
  97.     etags $(SOURCES)
  98. .PHONY: TAGS
  99.  
  100. clean:
  101.     @echo making $@ in lib; cd lib; $(MAKE) $(MDEFINES) $@
  102.     rm -f $(PROGS) *.o core ptx.c
  103. .PHONY: clean
  104.  
  105. distclean: clean
  106.     @echo making $@ in lib; cd lib; $(MAKE) $(MDEFINES) $@
  107.     rm -f tags TAGS Makefile config.status
  108. .PHONY: distclean
  109.  
  110. realclean: distclean
  111.     @echo making $@ in lib; cd lib; $(MAKE) $(MDEFINES) $@
  112.     rm -f Makefile config.status gptx.info checkout
  113. .PHONY: realclean
  114.  
  115. dist: checkout
  116.     echo gptx-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < version.c` > .fname
  117.     cat .fname
  118.     rm -rf `cat .fname`
  119.     mkdir `cat .fname`
  120.     ln $(DISTFILES) `cat .fname`
  121.     mkdir `cat .fname`/lib; cd lib; $(MAKE) $@
  122.     tar chZf `cat .fname`.tar.Z `cat .fname`
  123.     rm -rf `cat .fname` .fname
  124. .PHONY: dist
  125.  
  126. gptx.info: gptx.texi
  127.     $(MAKEINFO) $(srcdir)/gptx.texi
  128.  
  129. $(PROGS): lib/libptx.a version.o
  130.  
  131. gptx: gptx.o
  132.     $(CC) $(LDFLAGS) -o $@ gptx.o version.o lib/libptx.a $(LIBS)
  133.  
  134. ptx: ptx.o
  135.     $(CC) $(LDFLAGS) -o $@ ptx.o version.o lib/libptx.a $(LIBS)
  136.  
  137. ptx.o: gptx.c
  138.     rm -f ptx.c
  139.     cp $(srcdir)/gptx.c ptx.c
  140.     $(CC) $(CFLAGS) -DDEFAULT_IGNORE_FILE=\"@IGNOREFILE@\" -DPTX_COMPATIBILITY -c ptx.c
  141.     rm -f ptx.c
  142.  
  143. gptx.o ptx.o: gptx.h lib/bumpalloc.h lib/ctype.h lib/getopt.h lib/regex.h
  144.  
  145. checkout: COPYING
  146.     ./gptx -A -f < COPYING > checkoutx
  147.     mv checkoutx $@
  148.